<template>
  <div>
    <el-dialog title="挂接日志" :visible.sync="logOpen" width="45%" style="margin-top:8%" append-to-body
               :before-close="closeDelDialog">
      <el-table v-loading="logLoading" :data="logList" style="overflow-y:scroll;">
        <el-table-column label="序号" type="index" prop="id" />
        <el-table-column label="文件类型" prop="docFileType" :show-overflow-tooltip="true" />
        <el-table-column label="文件名称" prop="docName" :show-overflow-tooltip="true" />
        <el-table-column label="文件大小" prop="docFileSize" :show-overflow-tooltip="true">
          <template slot-scope="scope">
            {{ scope.row.docFileSize }} B
          </template>
        </el-table-column>
        <el-table-column label="上传结果" prop="result" :show-overflow-tooltip="true" />
        <el-table-column label="失败原因" prop="failResult" :show-overflow-tooltip="true" />
      </el-table>
      <pagination v-show="logTotal > 0" :total="logTotal" :page.sync="logParams.pageNum"
                  :limit.sync="logParams.pageSize" @pagination="getLogList" />
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "showLog",
  props: ["logOpen", "logTotal", "logLoading", "logList", "logParams"],
  data() {
    return {

    }
  },
  methods: {
    //关闭页面
    closeDelDialog() {
      this.$emit("showLogCancel")
    },
    getLogList() {
      this.$emit("getLogList", this.logParams)
    }
  }
}
</script>

<style scoped>

</style>
